package ar.com.fiuba.ElectronicCircuitAnalyst.application.api;

import ar.com.fiuba.ElectronicCircuitAnalyst.application.api.dto.SimulationResultDto;
import ar.com.fiuba.ElectronicCircuitAnalyst.application.api.dto.SimulationValuesDto;
import ar.com.fiuba.ElectronicCircuitAnalyst.domain.exceptions.CircuitElementNotFoundException;
import ar.com.fiuba.ElectronicCircuitAnalyst.domain.exceptions.CircuitInputValuesException;
import ar.com.fiuba.ElectronicCircuitAnalyst.domain.exceptions.InvalidCircuitElementException;
import ar.com.fiuba.ElectronicCircuitAnalyst.domain.exceptions.SimulationException;

/**
 * Interface for a service to perform simulations over a circuit.
 * 
 */
public interface SimulationService {

	/**
	 * Method to run a simulation over a circuit element with the values given.
	 * 
	 * @param circuitName
	 *            name of the circuit to simulate.
	 * @param simulationValues
	 *            values for simulation.
	 * @return a DTO with the results for each time of the simulation with the
	 *         specified circuit.
	 * @throws CircuitElementNotFoundException
	 *             if there's no circuit with the given name.
	 * @throws InvalidCircuitElementException
	 *             if there's an error reaching the circuit.
	 * @throws CircuitInputValuesException
	 *             if there's a problem using the input values in the circuit.
	 * @throws SimulationException 
	 */
	public SimulationResultDto simulate(String circuitName, SimulationValuesDto simulationValues)
			throws CircuitElementNotFoundException, InvalidCircuitElementException, 
				   CircuitInputValuesException, SimulationException;

}
